using System;
using System.Collections.Generic;
using System.Text;
using SlimDX;

namespace Barrage.Elements
{
    /// <summary>
    /// Element that holds some lighting information, used in shader to apply lighting effects.
    /// Must be added to the scene's DefaultLights property.
    /// The number of lights and which lighting data is used depends on every shader's code.
    /// </summary>
    public class Light:Element
    {
        Color3 ambient = new Color3(0.5f,0.5f,0.5f);
        /// <summary>
        /// Ambient color component. Defaults to [0.5,0.5,0.5]
        /// </summary>
        public Color3 Ambient { get { return ambient; } }
        Color3 diffuse = new Color3(0.5f, 0.5f, 0.5f);
        /// <summary>
        /// Diffuse color component. Defaults to [0.5,0.5,0.5]
        /// </summary>
        public Color3 Diffuse { get { return diffuse; } }
        Color3 specular = new Color3(0.5f, 0.5f, 0.5f);
        /// <summary>
        /// Specular color component. Defaults to [0.5,0.5,0.5]
        /// </summary>
        public Color3 Specular { get { return specular; } set { specular = value; } }
        Vector3 attenuation = new Vector3(0.01f, 0.05f, 0);
        /// <summary>
        /// Attenuation values [constant,linear,quadratic]. Defaults to [0.01,0.05,0]
        /// </summary>
        public Vector3 Attenuation { get { return attenuation; } set { attenuation = value; } }

        /// <summary>
        /// Constructor. Inits default values
        /// </summary>
        public Light()
        {        
        }

        /// <summary>
        /// Constructor. Inits values based on passed color:
        /// Ambient = [0,0,0]
        /// Diffuse = Color
        /// Specular = Color
        /// </summary>
        /// <param name="color">Light color</param>
        public Light(Color3 color)
        {
            ambient = new Color3(0,0,0);
            diffuse = color;
            specular = color;
        }

        /// <summary>
        /// \internal Does nothing as lights can't be rendered
        /// </summary>
        protected override void DoRender()
        {
            
        }
        
    }
}
